home *** CD-ROM | disk | FTP | other *** search
/ Champak 50 / Volume 50 - JOGO DISK .iso / Games / marionettemadness.swf / scripts / frame_1 / DoAction.as < prev   
Text File  |  2007-10-01  |  871b  |  33 lines

  1. function playSound(ln, l)
  2. {
  3.    if(l)
  4.    {
  5.       this[ln + "_sound"].snd.start(0,l);
  6.    }
  7.    else
  8.    {
  9.       this[ln + "_sound"].snd.start();
  10.    }
  11.    return this[ln + "_sound"].snd;
  12. }
  13. function stopSound(ln)
  14. {
  15.    this[ln + "_sound"].snd.stop();
  16. }
  17. function stopSounds()
  18. {
  19.    for(var _loc2_ in soundList)
  20.    {
  21.       this[soundList[_loc2_] + "_sound"].snd.stop();
  22.    }
  23. }
  24. this.masterVolume = new Sound(this);
  25. this.createEmptyMovieClip("soundHolder_mc",this.getNextHighestDepth());
  26. soundList = ["gameStart","inRound","c1","c2","c3","c4","c5","soundtrack","m1","m2","m3","m4","end1","end2","end3","end4","loser","winner"];
  27. for(var i in soundList)
  28. {
  29.    tmp = this[soundList[i] + "_sound"] = soundHolder_mc.createEmptyMovieClip(soundList[i],soundHolder_mc.getNextHighestDepth());
  30.    tmp.snd = new Sound(tmp);
  31.    tmp.snd.attachSound(soundList[i]);
  32. }
  33.